<?php
/**
 * 
 * @author Paolo Bertuzzo
 *
 */
namespace Catalog\Helper;

use Zend\View\Helper\Partial;
use Utilities\Session\SessionFacade;

class SocialCalloutHelper extends Partial
{

    /**
     */
    protected $configuration;
    
    /**
     * 
     * @param array $configuration
     */
    public function __construct($configuration) 
    {
        $this->configuration = $configuration;	
    }
    
    /**
     * (non-PHPdoc)
     *
     * @see \Zend\View\Helper\Partial::__invoke()
     */
    public function __invoke($name = NULL, $values = NULL)
    {
        return parent::__invoke('helper/social_callout', array(
        	'locale' => $this->getLocale(),
            'facebook_href' => $this->configuration['facebook_href'],
            'twitter_href' => $this->configuration['twitter_href']
        ));
    }

    /**
     *
     */
    private function getLocale()
    {
    	$sessionFacade = new SessionFacade();
    
    	return $sessionFacade->getLocale();
    }
}

?>